#include <stdbool.h>

int reversenum(int a)
{
    int reverse=0;
    while(a/10!=0)
    {
        reverse=reverse*10+a%10;
        a/=10;
    }
    reverse=reverse*10+a%10; 
    return reverse;     
}
    
bool isSameAfterReversals(int num) 
{   int reverse1;
    int reverse2;
    reverse1=reversenum(num);
    reverse2=reversenum(reverse1);
    if((reverse2==num)==true)
    return true;
    else
    return false;
}